<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../../include/admincontent.jsp" %>
<div id="location">当前位置：首页 > 招聘实施 > 中专校园招聘 > 简历筛选</div>
<div id="Content">
    <div class="btnbar">
        <button type="button" class="view" id="zzuser_view">查看毕业生信息</button>
        <button type="button" class="view" id="zzuser_edit">修改毕业生信息</button>
        <button type="button" class="list" id="zzuser_give">部门划分</button>
        <button type="button" class="card" id="do_zzopen">开启</button>
        <button type="button" class="card" id="do_zzclose">关闭</button>
        <button type="button" class="list" id="do_zznext">进入下一步</button>
        <button type="button" class="back" onclick="javascript:history.go(-1);">返 回</button>
    </div>

    <!-- 筛选条件 -->
    <div id="searchbox">
        <form id="sform">
            <input type="hidden" name="pid" value="${pid}"/>
           <%-- <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">学校名称：</td>
                    <td width="200">
                        <div><select name="adduid">${school}</select></div>
                    </td>
                    <td width="60">学生姓名：</td>
                    <td width="150">
                        <div><input type="text" name="name"/></div>
                    </td>
                    <td width="60">身份证号：</td>
                    <td width="150">
                        <div><input type="text" name="code"/></div>
                    </td>
                    <td width="40"></td>
                    <td></td>
                </tr>
                <tr>
                    <td>审核状态：</td>
                    <td>
                        <div>
                            <select name="state">
                                <option value="-1">全部</option>
                                <option value="0">待审核</option>
                                <option value="1">审核中</option>
                                <option value="2">已通过</option>
                                <option value="3">未通过</option>
                            </select>
                        </div>
                    </td>
                    <td>所学专业：</td>
                    <td>
                        <div><input type="text" name="major"/></div>
                    </td>
                    <td>责任部门：</td>
                    <td>
                        <div><input type="text" name="deptname"/></div>
                    </td>
                    <td>
                        <button id="searchbtn" type="button" class="search"></button>
                    </td>
                    <td></td>
                </tr>
                </thead>
            </table>--%>
        </form>
    </div>

    <!-- 部门划分 -->
    <form id="deptform" method="post" action="${path}/Do/ZZRecommend/DeptAction">
        <input type="hidden" name="pid" value="${pid}"/>
        <div id="deptpanel" class="condition_cont">
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">责任部门：</td>
                    <td width="300">
                        <div>
                            <input type="hidden" name="zrdeptcode" id="deptcode"/>
                            <input type="text" name="zrdeptname" id="deptname" class="select" onFocus="blur()"
                                   datatype="*" nullmsg="请选择责任部门！"/>
                        </div>
                    </td>
                    <td width="60">
                        <button type="submit" class="save">提 交</button>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="4" style="text-align:left; letter-spacing:2px;">
                        系统提示：只有 “待审核” 和 “审核中” 两种状态下的毕业生信息可以完成部门划分
                    </td>
                </tr>
                </thead>
            </table>
        </div>

        <div id="page_top" class="page"></div><table class="treeTable" id="tablelist">
            <thead>
            <tr>
                <td width="20"><input type="checkbox" class="allcheckbox" title="选择全部/取消全选"/></td>
                <td width="35">序号</td>
                <td width="60">姓名</td>
                <td width="40">性别</td>
                <td width="120">身份证号</td>
                <td>所学专业</td>
                <td width="90">毕业时间</td>
                <td width="60">在校表现</td>
                <td width="60">有无挂科</td>
                <td width="100">特长</td>
                <td width="150">招聘责任部门</td>
                <td width="60">状态</td>
                <td width="50"></td>
            </tr>
            </thead>
            <tbody id="result"></tbody>
        </table>
    </form>
    <div id="page"></div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        getList();
        $('#searchbtn').click(function () {
            getList();
        });

        $('#zzuser_give').click(function () {
            $('#deptpanel').slideToggle(300);
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
        });

        $('#deptname').click(function () {
            openLayer('选择责任部门', '/SysAdmin/getdepts', '90%', '98%');
        });

        $("#deptform").Validform({
            ajaxPost: true,
            callback: function (data) {
                $.Showmsg(data.Message);
                if (data.state) {
                    getList();
                }
            }
        });

        $('#do_zzopen').click(function () {
            layer.confirm('开启以后中专院校可以推荐毕业生。<br>确定要开启吗？', {
                btn: ['是', '否']
            }, function () {
                var url = '/Do/ZZRecommend/OpenCloseAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}';
                postAjax(url, null, function (data) {
                    $.Showmsg(data.Message);
                });
                layer.closeAll();
            }, function () {
                layer.closeAll();
            });
        });

        $('#do_zzclose').click(function () {
            layer.confirm('关闭以后中专院校不能推荐毕业生。<br>确定要关闭吗？', {
                btn: ['是', '否']
            }, function () {
                var url = '/Do/ZZRecommend/OpenCloseAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}';
                postAjax(url, null, function (data) {
                    $.Showmsg(data.Message);
                });
                layer.closeAll();
            }, function () {
                layer.closeAll();
            });
        });

        $('#do_zznext').click(function () {
            layer.confirm('只能将本部门负责招聘实施的信息提交到下一步<br>确定要执行吗？', {
                btn: ['是', '否']
            }, function () {
                DelInfo('/Do/ZZRecommend/NextAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}');
                layer.closeAll();
            }, function () {
                layer.closeAll();
            });
        });
    });

    function getList() {
        $('#page').myPagination({
            cssStyle: "pagination",
            ajax: {
                on: true,
                url: '${path}/Do/ZZRecommend/getusers?flowid=${fid}',
                param: $('#sform').serialize(),
                dataType: 'html',
                callback: function (data) {
                    $('#result').html(data);
                }
            }
        });
    }
</script>
</body>
</html>